﻿
using ICSharpCode.SharpZipLib.Zip;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using XKPlatform;

namespace AutoCreateCodePlus
{
    public class AutoCodeClass
    {

        //private readonly string USERFILEPATH = Path.Combine(HttpContextCore.Env.WebRootPath, "files");
        //private readonly string USERFILETEMP = Path.Combine(HttpContextCore.Env.WebRootPath, "files/temp");
        //private readonly string USERFILEZIP = Path.Combine(HttpContextCore.Env.WebRootPath, "files/zip");
        /// <summary>
        /// 创建代码
        /// </summary>
        /// <param name="tabName">表名</param>
        /// <param name="modelName">实体名</param>
        /// <param name="constr">数据库连接</param>
        /// <returns></returns>
        public string CreateCode(string tabName, string modelName, string path, string constr, List<SysTableColCfg> list)
        {
            var moInfo = getCfg(tabName, modelName);

            string str = CreateFile(moInfo, constr, path, list);
            return str;
        }

        private ModelInfo getCfg(string tabName, string modelName)
        {
            ModelInfo minfo = new ModelInfo();

            minfo.iServicePackage = "..\\XKPlatform\\IService";
            minfo.iServiceProject = "XKPlatform";

            minfo.modelPackage = "..\\XKPlatform.DataModels\\SysModel";
            minfo.modelProject = "XKPlatform";

            minfo.tableName = tabName.Split(',');
            minfo.objectName = modelName.Split(',');

            minfo.servicePackage = "..\\XKPlatform\\Service";
            minfo.serviceProject = "XKPlatform";



            return minfo;
        }

        private string CreateFile(ModelInfo model, string constr, string path, List<SysTableColCfg> list)
        {

            WriteIn wr = new WriteIn();

            StringBuilder str = new StringBuilder();
            List<string> lst = new List<string>();


            //创建model 
            var Mnamespace_ = model.modelProject;
            string isCreate1 = wr.Create(model.tableName, model.objectName, 1, path, constr, Mnamespace_);
            lst.Add(isCreate1);

            //创建服务  
            var namespace_ = model.serviceProject;
            string isCreate4 = wr.Create(model.tableName, model.objectName, 4, path, constr, namespace_);
            lst.Add(isCreate4);

            //创建服务接口 
            var Inamespace_ = model.iServiceProject;
            string isCreate5 = wr.Create(model.tableName, model.objectName, 5, path, constr, Inamespace_);
            lst.Add(isCreate5);

            //创建html 文件  创建 search Model
            string htmPath = CreateHtml(path, list, model.objectName[0]);
            lst.Add(htmPath);
            //创建 search Model
            string searchPath = CreateSearchModel(path, list.Where(o => o.isSearch).ToList(), namespace_, model.objectName[0]);
            lst.Add(searchPath);

            //创建controller
            string controlerPath = CreateController(path, list.Where(o => o.isSearch).ToList(), model.objectName[0]);
            lst.Add(controlerPath);

            var strpath = GetZipFilePath(lst, path, model.objectName[0]);
            return strpath;
        }
        /// <summary>
        /// 读取模板内容
        /// </summary>
        /// <param name="htmTempletPath"></param>
        /// <returns></returns>
        private string ReadTemp(string htmTempletPath)
        {
            string strData = "";
            //读取html 模板
            try
            {
                string line;
                // 创建一个 StreamReader 的实例来读取文件 ,using 语句也能关闭 StreamReader
                using (System.IO.StreamReader sr = new System.IO.StreamReader(htmTempletPath))
                {
                    // 从文件读取并显示行，直到文件的末尾 
                    while ((line = sr.ReadLine()) != null)
                    {
                        //Console.WriteLine(line);
                        strData += line + "\n";
                    }
                }
            }
            catch (Exception e)
            {

            }
            return strData;
        }

        private string CreateController(string destPath, List<SysTableColCfg> list, string modelName)
        {
            //创建文件存放路径
            var sourcPath = destPath.Substring(0, destPath.LastIndexOf(@"\") > -1 ? destPath.LastIndexOf(@"\") : destPath.LastIndexOf(@"/"));
            //模板存放路径
            var tempPath = Path.Combine(sourcPath, "HtmlTemplet");
            //单表模板文件地址
            var htmTempletPath = Path.Combine(tempPath, "singlePageController.txt");
            //生成html 存放地址
            var htmPath = Path.Combine(destPath, modelName + "Controller.cs");
            string strData = ReadTemp(htmTempletPath);

            if (!Directory.Exists(destPath))//判断路径下是否存在该文件
            {
                //根据目录创建指定的文件夹
                Directory.CreateDirectory(destPath);
            }
            string sqlWhere = "";
            //组织查询代码段
            for (int index = 0; index < list.Count; index++)
            {
                var colName = "Search" + list[index].colName;

                //判断类型 根据类型判空 TODO 弹框给固定高度，超出高度 加滚动条， 默认ID 隐藏在弹框
                string itemStr = "";
                string searchTy = list[index].searchTy;

                if (list[index].netType.ToLower() == "string" || list[index].netType.ToLower().Contains("datetime"))
                {
                    if (list[index].searchTy == "Like")
                    {
                        itemStr = @" 
                if (!string.IsNullOrWhiteSpace(search." + colName + @"))
                {
                    where = where.And(o => o." + list[index].colName + ".Contains(" + @" search." + colName + @"));
                }
                ";
                    }
                    else
                    {
                        if (list[index].searchTy == "=")
                        {
                            searchTy = "==";
                            itemStr = @" 
                if (!string.IsNullOrWhiteSpace(search." + colName + @"))
                {
                    where = where.And(o => o." + list[index].colName + searchTy + @" search." + colName + @");
                }
                ";
                        }
                        else if (list[index].searchTy == ">=" || list[index].searchTy == ">" || list[index].searchTy == "<=" || list[index].searchTy == "<")
                        {
                            itemStr = @" 
                            if (!string.IsNullOrWhiteSpace(search." + colName + @"))
                            {
                                where = where.And(o => o." + list[index].colName + @".CompareTo(search." + colName + @")" + list[index].searchTy + @"0);
                            }";
                        }
                        else if (list[index].searchTy.ToLower() == "between" && list[index].netType.ToLower().Contains("datetime"))
                        {
                            itemStr = @" if (!string.IsNullOrWhiteSpace(search." + colName + ") && search." + colName + @".Contains("" - ""))
                            {
                                var startDate = search." + colName + @".Split("" - "")[0];
                                var endDate = search." + colName + @".Split("" - "")[1];
                                where = where.And(o => o.CreatedOn >= Convert.ToDateTime(startDate) && o.CreatedOn <= Convert.ToDateTime(endDate));
                            }";

                        }


                    }
                    sqlWhere += itemStr;
                }
                else
                {
                    if (list[index].searchTy == "Like")
                    {
                        itemStr = @"where = where.And(o => o." + list[index].colName + ".Contains(" + @" search." + colName + @"))";
                    }
                    else
                    {
                        var compare = list[index].searchTy == "=" ? "==" : list[index].searchTy;

                        itemStr = @"where = where.And(o => o." + list[index].colName + compare + @" search." + colName + @");";
                    }
                    sqlWhere += itemStr;
                }



            }

            //模板替换
            var str = "";
            if (list.Count > 0)
            {
                str = strData.Replace("$modelName$", modelName).Replace("$SearchWhere$", sqlWhere)
                .Replace("$tableName$", list[0].tbName);
            }
            else
            {
                str = strData.Replace("$modelName$", modelName).Replace("$SearchWhere$", "")
               .Replace("$tableName$", "");
            }

            File.AppendAllText(htmPath, str, Encoding.UTF8);

            return modelName + "Controller.cs";
        }



        private string CreateSearchModel(string destPath, List<SysTableColCfg> list, string nameSpace, string modelName)
        {
            //创建文件存放路径
            var className = modelName + "SearchParams.cs";

            var csPath = Path.Combine(destPath, className);

            if (!Directory.Exists(destPath))//判断路径下是否存在该文件
            {
                //根据目录创建指定的文件夹
                Directory.CreateDirectory(destPath);
            }
            //创建内容
            StringBuilder srtBuilder = new StringBuilder();
            srtBuilder.AppendLine("//------------------------------------------------------------------------------");
            srtBuilder.AppendLine("//此代码由工具生成");
            srtBuilder.AppendLine("//请使用partial类进行扩展,避免修改被覆盖");
            srtBuilder.AppendLine("//createTime:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));

            srtBuilder.AppendLine("//------------------------------------------------------------------------------");
            srtBuilder.AppendLine("using System;");
            srtBuilder.AppendLine("using System.Text;");
            srtBuilder.AppendLine("using XKPlatform.DataModels.Dao.BaseEntity;");

            srtBuilder.AppendLine(string.Format("namespace {0}", nameSpace));
            srtBuilder.AppendLine("{");
            srtBuilder.AppendLine(string.Format("    public partial class {0}: BasePageInfo", className.Substring(0, className.LastIndexOf("."))));
            srtBuilder.AppendLine("    {");
            srtBuilder.AppendLine("        ");



            foreach (var item in list)
            {
                var colName = item.colName;
                //if (item.netType.ToLower().Contains("datetime"))
                //{
                colName = "Search" + item.colName;
                //  }
                string netTp = "string";
                if (item.netType == "DateTime?")
                {
                    netTp = "string";
                }
                else
                {
                    netTp = item.netType;
                }
                srtBuilder.Append(string.Format("        public  {0}  {1} ", netTp, colName));
                srtBuilder.AppendLine("{get;set;}");
            }
            srtBuilder.AppendLine("     }");
            srtBuilder.AppendLine("}");

            File.AppendAllText(csPath, srtBuilder.ToString(), Encoding.UTF8);
            return className;
        }

        private string CreateHtml(string destPath, List<SysTableColCfg> list, string modelName)
        {
            //创建文件存放路径
            var sourcPath = destPath.Substring(0, destPath.LastIndexOf(@"\") > -1 ? destPath.LastIndexOf(@"\") : destPath.LastIndexOf(@"/"));
            //模板存放路径
            var tempPath = Path.Combine(sourcPath, "HtmlTemplet");
            //单表模板文件地址
            var htmTempletPath = Path.Combine(tempPath, "singlePage1.html");
            //生成html 存放地址
            var htmPath = Path.Combine(destPath, modelName + ".html");
            string strData = ReadTemp(htmTempletPath);

            if (!Directory.Exists(destPath))//判断路径下是否存在该文件
            {
                //根据目录创建指定的文件夹
                Directory.CreateDirectory(destPath);
            }
            var item = getArea(tempPath, list);
            #region 处理内置下拉框数据源
            //遍历列配置查询出 showTy 是下拉框的字段 '#DefaultRoleIDs', '#DefaultRoleID'
            var dropCols = list.Where(o => o.showTy?.Trim() == "下拉框" && !string.IsNullOrEmpty(o.dicTy)).ToList();
            string dropAction = "";
            if (dropCols != null && dropCols.Count > 0)
            {

                foreach (var dopItem in dropCols)
                {
                    string dropIds = "";
                    if (dopItem.isEdit || dopItem.isInsert)
                    {
                        dropIds += "'#" + dopItem.colName + "',";

                    }
                    if (dopItem.isSearch)
                    {
                        dropIds += "'#Search" + dopItem.colName + "',"; //搜索字段自动拼接search
                    }

                    dropIds = dropIds.TrimEnd(',');

                    if (!string.IsNullOrEmpty(dropIds))
                    {
                        dropAction += string.Format("QueryItemNameCodeLst([{0}], '/SysDictionary/GetDicDataSelect?dicTp={1}', '', form);", dropIds, dopItem.dicTy);
                    }
                }
            }

            #endregion
            var htm = strData.Replace("{{searchArea}}", item.SearchArea).Replace("{{editArea}}", item.EditArea).Replace("$colArry$", item.TbColLst)
                .Replace("$dateList$", item.SearhDateIds == "" ? "\"\"" : item.SearhDateIds).Replace("$editDateIds$", item.EditDateIds == "" ? "\"\"" : item.EditDateIds)
                .Replace("$getUrl$", "\"/" + modelName + "/GetList\"")
                .Replace("$delUrl$", "\"/" + modelName + "/Delete?ID=\"")
                .Replace("$saveUrl$", "\"/" + modelName + "/SaveOrEdit\"")
                .Replace("$exportExcel$", "\"/" + modelName + "/ExportExcel\"")
                .Replace("$delallUrl$", "\"/" + modelName + "/DelAll\"")
                .Replace("$DropAction$", dropAction) //下拉框方法替换
                .Replace("$formSelectsIds$", item.FormSelectsIds == "" ? "\"\"" : item.FormSelectsIds);
            //处理图片控件
            var ImageCols = list.Where(o => o.showTy?.Trim() == "图片控件").ToList();
            string imgInit = "", imgDelete = "", imgEmpty = "", imgReShow = "", imageSave = "";  

            if (ImageCols != null && ImageCols.Count > 0)
            {
                // $ImageInit$   $ImageDelete$    $ImageEmpty$       $ImageReShow$  $ImageSave$
                foreach (var imgItem in ImageCols)
                {
                    imgInit += " InitUpLoad(upload, \"" + imgItem.colName + "\");";
                    imgDelete += "DeleImag(\"" + imgItem.colName + "\");";
                    imgEmpty += "$('#" + imgItem.colName + "1').html('');";
                    imgReShow += "ImageFileShow(data." + imgItem.colName + ", \"" + imgItem.colName + "\") ;";
                    imageSave += " data.field."+ imgItem.colName + " = \"\";\r\n            data.field."+ imgItem.colName + " = GetSaveImageInput(\""+ imgItem.colName + "\");";
                     
                }
            }
              htm = htm.Replace("$ImageInit$", imgInit)
                .Replace("$ImageDelete$", imgDelete)
                .Replace("$ImageEmpty$", imgEmpty)
                .Replace("$ImageReShow$", imgReShow)
                 .Replace("$ImageSave$", imageSave);
            File.AppendAllText(htmPath, htm, Encoding.UTF8);

            return modelName + ".html";
        }

        /// <summary>
        /// 生成 查询区域 新增编辑区域
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        private AreaItmes getArea(string tempPath, List<SysTableColCfg> list)
        {
            string searcHtml = "", addHtml = "", searchArea = "";

            AreaItmes items = new AreaItmes();
            searchArea = ReadTemp(Path.Combine(tempPath, "SearchArea.html"));
            var colList = new List<tableCol>();
            var dateIds = new List<string>();
            var EditdateIds = new List<string>();
            var FormSelectsIds = new List<string>();
            string clsJson = "";
            string EditDateIdJson = "";
            string FormSelectIdJson = "";
            string searchdateIdJson = "";
            list = list.OrderBy(t => t.sort).ToList();
            for (var index = 0; index < list.Count; index++)
            {
                var obj = new tableCol();
                obj.hide = true;
                obj.field = list[index].colName;
                obj.align = "center";
                obj.title = list[index].colDes;

                if (list[index].isSearch)
                {
                    var colName = "Search" + list[index].colName;
                    switch (list[index].showTy)
                    {
                        case "下拉框":
                            searcHtml += HttpHelper.HttpGetAsyncByProxy(HttpHelper.localhost + "dropListSearchArea.html").Replace("{{colDes}}", list[index].colDes).Replace("{{colName}}", colName);
                            break;
                        case "日期控件":

                            dateIds.Add(colName);
                            searcHtml += HttpHelper.HttpGetAsyncByProxy(HttpHelper.localhost + "dateSearchArea.html").Replace("{{colDes}}", list[index].colDes).Replace("{{colName}}", colName.Replace("#", ""));
                            break;
                        case "单选框":
                            searcHtml += HttpHelper.HttpGetAsyncByProxy(HttpHelper.localhost + "radioSearchArea.html").Replace("{{colDes}}", list[index].colDes).Replace("{{colName}}", colName);
                            break;
                        case "复选框":
                            searcHtml += HttpHelper.HttpGetAsyncByProxy(HttpHelper.localhost + "checkboxSearchArea.html").Replace("{{colDes}}", list[index].colDes).Replace("{{colName}}", colName);
                            break;
                        case "多选下拉框":
                            //查询区域 属性默认增加 s  以区分编辑区

                            FormSelectsIds.Add(colName);
                            searcHtml += HttpHelper.HttpGetAsyncByProxy(HttpHelper.localhost + "multipleSelectSearchArea.html").Replace("{{colDes}}", list[index].colDes).Replace("{{colName}}", colName);
                            break;
                        default:
                            searcHtml += HttpHelper.HttpGetAsyncByProxy(HttpHelper.localhost + "inputSearchArea.html").Replace("{{colDes}}", list[index].colDes).Replace("{{colName}}", colName);
                            break;
                    }
                }
                if (list[index].isInsert)
                {
                    switch (list[index].showTy)
                    {
                        case "下拉框":
                            var dropLst = HttpHelper.HttpGetAsyncByProxy(HttpHelper.localhost + "dropListEditArea.html").Replace("{{colDes}}", list[index].colDes).Replace("{{colName}}", list[index].colName);
                            if (list[index].biTian)
                            {
                                addHtml += dropLst.Replace("{{required}}", "required").Replace("{{*}}", "<span style='color: red; '>*</span>");
                            }
                            else
                            {
                                addHtml += dropLst.Replace("{{required}}", "").Replace("{{*}}", ""); ;
                            }
                            break;
                        case "日期控件":
                            EditdateIds.Add("#" + list[index].colName);

                            var date = HttpHelper.HttpGetAsyncByProxy(HttpHelper.localhost + "dateEditArea.html").Replace("{{colDes}}", list[index].colDes).Replace("{{colName}}", list[index].colName);

                            if (list[index].biTian)
                            {
                                addHtml += date.Replace("{{required}}", "required").Replace("{{*}}", "<span style='color: red; '>*</span>");
                            }
                            else
                            {
                                addHtml += date.Replace("{{required}}", "").Replace("{{*}}", "");
                            }
                            break;
                        case "单选框":
                            var radio = HttpHelper.HttpGetAsyncByProxy(HttpHelper.localhost + "radioEditArea.html").Replace("{{colDes}}", list[index].colDes).Replace("{{colName}}", list[index].colName);

                            if (list[index].biTian)
                            {
                                addHtml += radio.Replace("{{required}}", "required").Replace("{{*}}", "<span style='color: red; '>*</span>");
                            }
                            else
                            {
                                addHtml += radio.Replace("{{required}}", "").Replace("{{*}}", ""); ;
                            }
                            break;
                        case "复选框":
                            var checkbox = HttpHelper.HttpGetAsyncByProxy(HttpHelper.localhost + "checkboxEditArea.html").Replace("{{colDes}}", list[index].colDes).Replace("{{colName}}", list[index].colName);

                            if (list[index].biTian)
                            {
                                addHtml += checkbox.Replace("{{required}}", "required").Replace("{{*}}", "<span style='color: red; '>*</span>");
                            }
                            else
                            {
                                addHtml += checkbox.Replace("{{required}}", "").Replace("{{*}}", ""); ;
                            }

                            break;
                        case "图片控件":
                            var imagearea = HttpHelper.HttpGetAsyncByProxy(HttpHelper.localhost + "ImageEditArea.html").Replace("{{colDes}}", list[index].colDes).Replace("{{colName}}", list[index].colName);
                            if (list[index].biTian)
                            {
                                addHtml += imagearea.Replace("{{*}}", "<span style='color: red; '>*</span>");
                            }
                            else
                            {
                                addHtml += imagearea.Replace("{{*}}", "");
                            }
                            break;
                        case "多选下拉框":
                            FormSelectsIds.Add(list[index].colName);

                            var formSelect = HttpHelper.HttpGetAsyncByProxy(HttpHelper.localhost + "multipleSelectEditArea.html").Replace("{{colDes}}", list[index].colDes).Replace("{{colName}}", list[index].colName);

                            if (list[index].biTian)
                            {
                                addHtml += formSelect.Replace("{{required}}", "required").Replace("{{*}}", "<span style='color: red; '>*</span>");
                            }
                            else
                            {
                                addHtml += formSelect.Replace("{{required}}", "").Replace("{{*}}", ""); ;
                            }
                            break;
                        default:
                            var inputArea = HttpHelper.HttpGetAsyncByProxy(HttpHelper.localhost + "inputEditArea.html").Replace("{{colDes}}", list[index].colDes).Replace("{{colName}}", list[index].colName);


                            if (list[index].biTian)
                            {
                                addHtml += inputArea.Replace("{{required}}", "required").Replace("{{*}}", "<span style='color: red; '>*</span>"); ;
                            }
                            else
                            {
                                addHtml += inputArea.Replace("{{required}}", "").Replace("{{*}}", ""); ;
                            }
                            break;
                    }


                }
                //是列表
                if (list[index].isList)
                {
                    obj.hide = false;
                }
                colList.Add(obj);
            }
            if (colList != null && colList.Count > 0)
            {
                clsJson = JsonConvert.SerializeObject(colList);
            }

            searchdateIdJson = (dateIds == null || dateIds.Count == 0) ? "" : JsonConvert.SerializeObject(dateIds);

            EditDateIdJson = (EditdateIds == null | EditdateIds.Count == 0) ? "" : JsonConvert.SerializeObject(EditdateIds);

            FormSelectIdJson = (FormSelectsIds == null | FormSelectsIds.Count == 0) ? "" : JsonConvert.SerializeObject(FormSelectsIds);

            items.SearchArea = searchArea.Replace("{{searchArea}}", searcHtml);
            items.EditArea = addHtml;
            items.TbColLst = clsJson.Replace("[", "[{ checkbox: true },");
            items.SearhDateIds = searchdateIdJson;
            items.EditDateIds = EditDateIdJson;
            items.FormSelectsIds = FormSelectIdJson;
            return items;
        }
        /// <summary>
        /// 返回压缩包地址
        /// </summary>
        /// <param name="filepaths"></param>
        /// <param name="USERFILEZIP"></param>
        /// <param name="fileName"></param>
        /// <returns></returns>
        private string GetZipFilePath(List<string> filepaths, string USERFILEZIP, string fileName)
        {
            string path = fileName + ".zip";
            string zippath = Path.Combine(USERFILEZIP, path);

            Dictionary<string, byte[]> dic = new Dictionary<string, byte[]>();

            if (filepaths == null || filepaths.Count == 0)
            {
                return null;
            }

            foreach (var item in filepaths)
            {
                byte[] zipdata = System.IO.File.ReadAllBytes(Path.Combine(USERFILEZIP, item.TrimStart('/')));
                dic.Add(item.Substring(item.LastIndexOf('/') + 1), zipdata);
            }

            if (!Directory.Exists(Path.GetDirectoryName(zippath)))
            {
                Directory.CreateDirectory(Path.GetDirectoryName(zippath));
            }

            // 压缩多个文件
            CreateZipPackage(zippath, dic);

            FileStream fs = null;
            try
            {

                return zippath;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (fs != null)
                {
                    fs.Close();
                }
            }
        }
        /// <summary>
        /// 创建压缩包
        /// </summary>
        /// <param name="zipName">压缩包名称（路径）</param>
        /// <param name="files">要压缩的文件，key-文件名，value-文件字节数组</param>
        public void CreateZipPackage(string zipName, Dictionary<string, byte[]> files)
        {
            using (FileStream zip = System.IO.File.Create(zipName))
            {
                using (ZipOutputStream zipStream = new ZipOutputStream(zip))
                {
                    foreach (KeyValuePair<string, byte[]> kv in files)
                    {
                        //压缩包内条目
                        ZipEntry entry = new ZipEntry(kv.Key);
                        //添加条目
                        zipStream.PutNextEntry(entry);
                        //设置压缩级别1~9
                        zipStream.SetLevel(5);
                        //写入
                        zipStream.Write(kv.Value, 0, kv.Value.Length);
                    }
                }
            }
        }
    }

    public class tableCol
    {
        public string field { get; set; }
        public string title { get; set; }
        public string align { get; set; }
        public bool hide { get; set; }
    }
    public class AreaItmes
    {
        /// <summary>
        /// 查询区域
        /// </summary>
        public string SearchArea { get; set; }
        /// <summary>
        /// 编辑区域
        /// </summary>
        public string EditArea { get; set; }
        /// <summary>
        /// table 列 数组
        /// </summary>
        public string TbColLst { get; set; }
        /// <summary>
        /// 查询区域 日期插件数组
        /// </summary>
        public string SearhDateIds { get; set; }
        /// <summary>
        /// 新增区域 日期插件数组
        /// </summary>
        public string EditDateIds { get; set; }

        /// <summary>
        /// 多选下拉框插件数组
        /// </summary>
        public string FormSelectsIds { get; set; }

    }
}

